What is the main difference between transverse and longitudinal waves?

The main difference between transverse and longitudinal waves is the direction of the wave oscillation relative to the direction of wave propagation. In transverse waves, the oscillation is perpendicular to the direction of wave propagation, while in longitudinal waves, the oscillation is parallel to the direction of wave propagation. Examples of transverse waves include electromagnetic waves, water waves, and seismic S-waves, while examples of longitudinal waves include sound waves and seismic P-waves. Additionally, the speed of transverse waves generally depends upon the medium's elasticity or tension, while the speed of longitudinal waves depends on the medium's density and compressibility.